/*
 * @Author: wangtao
 * @Date: 2021-01-14 16:00:34
 * @LastEditors: 汪滔
 * @LastEditTime: 2021-01-15 00:36:37
 * @Description: file content
 */
import React, { Component, Fragment, PureComponent } from 'react';
import {
  TouchableOpacity,
  StyleSheet,
  View,
  Text,
  Image,
  Dimensions,
  BackHandler,
  SafeAreaView,
  NativeModules,
  DeviceEventEmitter,
  NativeEventEmitter,
  TextInput,
  ScrollView,
} from 'react-native';
import {
  px2dp,
  screenWidth,
  isAndroid,
  mainBgColorLightGray,
  mainBgColorWhite,
  fontColorBlack,
  fontColorCoffee,
} from '../../../../../common/styles/index';
import { Button, msg, Header, _, BackImage } from '../../../../../common';
import AddressItem from './address-item';

export default class AddressSearchList extends PureComponent {
  componentDidMount() {}

  componentWillUnmount() {}

  render() {
    const { addressSearchList, selectMapPosition } = this.props;
    return (
      <ScrollView>
        {!!addressSearchList.length &&
          addressSearchList.map((addressInfo, index) => {
            return (
              <AddressItem
                key={index}
                addressInfo={addressInfo}
                selectItem={selectMapPosition}
              />
            );
          })}
      </ScrollView>
    );
  }
}
const styles = StyleSheet.create({
  historyWrap: {
    flex: 1,
    backgroundColor: mainBgColorWhite,
  },
  header: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
    height: px2dp(104),
    paddingHorizontal: px2dp(32),
  },
  deleteImg: {
    width: px2dp(28),
    height: px2dp(28),
  },
  headerTitle: {
    fontSize: px2dp(32),
    color: fontColorBlack,
    fontWeight: 'bold',
  },
});
